<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>留言板xss攻击</title>
    <script src="js/vue.js"></script>
</head>
<body>
<div id="app">
    <div id="content_list" v-html="content_list"></div>
    <h1>{{msg}}</h1>
    <textarea  cols="50" rows="20" v-model="content"></textarea><br/><br/>
    <button @click="send">提交留言</button>
</div>

<script>
     const vm = new Vue({
             el : '#app',
             //Model M
             data : {
                 msg : '留言板',
                 content : '',
                 content_list : ''
             },
             methods :{
                 send(){
                      console.log(this.content)
                    this.content_list += this.content + '<br/>'
                 }
             }
         })
</script>
</body>
</html>